
<html><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta content="text/javascript" http-equiv="content-script-type">
<title>system.Event</title>
<link rel="stylesheet" type="text/css" href="candydoc/style.css">
<!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="candydoc/ie56hack.css"><![endif]-->
<script language="JavaScript" src="candydoc/util.js" type="text/javascript"></script>
<script language="JavaScript" src="candydoc/tree.js" type="text/javascript"></script>
<script language="JavaScript" src="candydoc/explorer.js" type="text/javascript"></script>
</head><body>
<div id="tabarea"></div><div id="explorerclient"></div>
<div id="content"><script>explorer.initialize("system.Event");</script>
	<table class="content">
		<tr><td id="docbody"><h1>system.Event</h1><!-- Generated by Ddoc from F:\MyWork\phoenix\source\system\Event.d -->
该模块提供事件机制。
<br><br>
<b>License:</b><br>
BSD
<br><br>
<b>Authors:</b><br>
Lucifer (786325481@QQ.com)
<br><br>


<script>explorer.outline.incSymbolLevel();</script>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">template 
<span class="currsymbol">EventHandler</span>
<script>explorer.outline.addDecl('EventHandler');</script>

(T,TEventArg : EventArgs = EventArgs)</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>表示将处理事件的方法。
<br><br>
<b>Comments:</b><br>
大多数情况下，我们应该使用这个模板。
           如果想自定义事件参数，请使用 Event(T...) 。
 
<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">struct 
<span class="currsymbol">Event</span>
<script>explorer.outline.addDecl('Event');</script>

(T...);
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>用于声明事件的事件机制。
<br><br>
<b>Comments:</b><br>
类似.NET的事件。
 
<br><br>


<script>explorer.outline.incSymbolLevel();</script>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">alias 
<span class="currsymbol">TDelegate</span>
<script>explorer.outline.addDecl('TDelegate');</script>

;
<br>alias 
<span class="currsymbol">TFunction</span>
<script>explorer.outline.addDecl('TFunction');</script>

;
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>事件所需要的委托或函数指针类型。
	 
<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">void 
<span class="currsymbol">add</span>
<script>explorer.outline.addDecl('add');</script>

(TDelegate <span class="funcparam">dg</span>);
<br>void 
<span class="currsymbol">add</span>
<script>explorer.outline.addDecl('add');</script>

(TFunction <span class="funcparam">fn</span>);
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>注册委托。
<br><br>
<b>Params:</b><br>
<table><tr>
<td nowrap valign="top" style="padding-right: 8px">TDelegate <span class="funcparam">dg</span></td>

               
<td>要注册的委托。
         它的类型是 void delegate(T...) 。</td></tr>
</table><br>
<b>Comments:</b><br>
该实现是线程安全和异常安全的。
           当有异常发生时，直接返回。
	 
<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">alias 
<span class="currsymbol">opCatAssign</span>
<script>explorer.outline.addDecl('opCatAssign');</script>

;
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>~= 操作符重载。
	 
<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">bool 
<span class="currsymbol">remove</span>
<script>explorer.outline.addDecl('remove');</script>

(TDelegate <span class="funcparam">dg</span>);
<br>bool 
<span class="currsymbol">remove</span>
<script>explorer.outline.addDecl('remove');</script>

(TFunction <span class="funcparam">fn</span>);
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>移除注册的委托。
<br><br>
<b>Params:</b><br>
<table><tr>
<td nowrap valign="top" style="padding-right: 8px">TDelegate <span class="funcparam">dg</span></td>

               
<td>要移除的委托。
         它的类型是 void delegate(T...) 。</td></tr>
</table><br>
<b>Returns:</b><br>
返回是否成功移除委托。
          如果成功，返回 <b>true</b> 。否则，返回 <b>false</b> 。
<br><br>
<b>Comments:</b><br>
该实现是线程安全和异常安全的。
           当有异常发生时，直接返回。
	 
<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">alias 
<span class="currsymbol">opSubAssign</span>
<script>explorer.outline.addDecl('opSubAssign');</script>

;
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>-= 操作符重载。
	 
<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">void 
<span class="currsymbol">invoke</span>
<script>explorer.outline.addDecl('invoke');</script>

(T <span class="funcparam">args</span>);
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>引发委托或函数指针调用。
<br><br>
<b>Comments:</b><br>
该实现是线程安全和异常安全的。
	 
<br><br>

</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">bool 
<span class="currsymbol">opEquals</span>
<script>explorer.outline.addDecl('opEquals');</script>

(Event!(T) <span class="funcparam">other</span>);
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>比较两个 Event(T...) 是否相等。
	 
<br><br>

</dd>
</dl>
<script>explorer.outline.decSymbolLevel();</script>


</dd>

<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">class 
<span class="currsymbol">EventArgs</span>
<script>explorer.outline.addDecl('EventArgs');</script>

;
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>包含事件数据的基类。
 
<br><br>


<script>explorer.outline.incSymbolLevel();</script>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl">static EventArgs 
<span class="currsymbol">empty</span>
<script>explorer.outline.addDecl('empty');</script>

();
</span></dt>
<script>explorer.outline.writeEnabled = false;</script>


<dd>表示没有事件数据的事件。
	 
<br><br>

</dd>
</dl>
<script>explorer.outline.decSymbolLevel();</script>


</dd>
</dl>
<script>explorer.outline.decSymbolLevel();</script>


</td></tr>
		<tr><td id="docfooter">
			Page was generated with
			<img src="candydoc/img/candydoc.gif" style="vertical-align:middle; position:relative; top:-1px">
			on Sat Nov 29 22:33:12 2008

		</td></tr>
	</table>
</div>
<script>
	explorer.packageExplorer.addModule("platform.PAL");
	explorer.packageExplorer.addModule("platform.windows.Core");
	explorer.packageExplorer.addModule("platform.linux.Core");
	explorer.packageExplorer.addModule("system.Array");
	explorer.packageExplorer.addModule("system.BitArray");
	explorer.packageExplorer.addModule("system.Environment");
	explorer.packageExplorer.addModule("system.Event");
	explorer.packageExplorer.addModule("system.Exception");
	explorer.packageExplorer.addModule("system.Hash");
	explorer.packageExplorer.addModule("system.IntPtr");
	explorer.packageExplorer.addModule("system.Random");
	explorer.packageExplorer.addModule("system.Traits");
	explorer.packageExplorer.addModule("system.TypeTuple");
	explorer.packageExplorer.addModule("system.math.IEEE");
	explorer.packageExplorer.addModule("system.math.Math");
	explorer.packageExplorer.addModule("system.runtime.c.complex");
	explorer.packageExplorer.addModule("system.runtime.c.config");
	explorer.packageExplorer.addModule("system.runtime.c.ctype");
	explorer.packageExplorer.addModule("system.runtime.c.errno");
	explorer.packageExplorer.addModule("system.runtime.c.fenv");
	explorer.packageExplorer.addModule("system.runtime.c.inttypes");
	explorer.packageExplorer.addModule("system.runtime.c.limits");
	explorer.packageExplorer.addModule("system.runtime.c.locale");
	explorer.packageExplorer.addModule("system.runtime.c.math");
	explorer.packageExplorer.addModule("system.runtime.c.signal");
	explorer.packageExplorer.addModule("system.runtime.c.stdarg");
	explorer.packageExplorer.addModule("system.runtime.c.stddef");
	explorer.packageExplorer.addModule("system.runtime.c.stdint");
	explorer.packageExplorer.addModule("system.runtime.c.stdio");
	explorer.packageExplorer.addModule("system.runtime.c.stdlib");
	explorer.packageExplorer.addModule("system.runtime.c.string");
	explorer.packageExplorer.addModule("system.runtime.c.time");
	explorer.packageExplorer.addModule("system.runtime.c.wctype");
	explorer.packageExplorer.addModule("system.text.UTF");
	explorer.packageExplorer.addModule("system.threading.Atomic");
	explorer.packageExplorer.addModule("system.threading.ThreadUtility");
	explorer.packageExplorer.addModule("system.threading.synchronization.SpinWait");
	explorer.packageExplorer.addModule("system.collections.ArrayList");
	explorer.packageExplorer.addModule("system.collections.Comparer");
	explorer.packageExplorer.addModule("system.collections.Deque");
	explorer.packageExplorer.addModule("system.collections.EqualityComparer");
	explorer.packageExplorer.addModule("system.collections.Exception");
	explorer.packageExplorer.addModule("system.collections.HashMap");
	explorer.packageExplorer.addModule("system.collections.HashSet");
	explorer.packageExplorer.addModule("system.collections.ICollection");
	explorer.packageExplorer.addModule("system.collections.IComparer");
	explorer.packageExplorer.addModule("system.collections.IDeque");
	explorer.packageExplorer.addModule("system.collections.IEnumerable");
	explorer.packageExplorer.addModule("system.collections.IEnumerator");
	explorer.packageExplorer.addModule("system.collections.IEqualityComparer");
	explorer.packageExplorer.addModule("system.collections.IList");
	explorer.packageExplorer.addModule("system.collections.IMap");
	explorer.packageExplorer.addModule("system.collections.IQueue");
	explorer.packageExplorer.addModule("system.collections.LinkedList");
	explorer.packageExplorer.addModule("system.collections.Pair");
	explorer.packageExplorer.addModule("system.collections.PrimeHelper");
	explorer.packageExplorer.addModule("system.collections.PriorityQueue");
	explorer.packageExplorer.addModule("system.collections.Queue");
	explorer.packageExplorer.addModule("system.collections.RBTree");
	explorer.packageExplorer.addModule("system.collections.Stack");
	explorer.packageExplorer.addModule("system.collections.TreeMap");
	explorer.packageExplorer.addModule("system.collections.TreeSet");
	explorer.packageExplorer.addModule("system.collections.objectmodel.ListCollection");
	explorer.packageExplorer.addModule("system.collections.objectmodel.ReadOnlyListCollection");</script>
</body></html>


